package cc.yugu.yhdw.webserver.persistence.hdw;

import cc.yugu.yhdw.common.domain.hdw.Supplier;
import cc.yugu.yhdw.common.domain.hdw.SupplierInfo;
import cc.yugu.yhdw.common.persistence.MasterMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
/**
 * 厂商信息
 * 
 * @Date:Created in 2018/7/2 9:47
 * @Author:
 * @Modified By: zjn 2018/7/2 9:47
 */ 
public interface SupplierMapper extends MasterMapper {
    /**
    * 根据主键查询表hdw_supplier
    *
    * @Param: [id]
    * @Return: cc.yugu.yhdw.common.domain.hdw.Supplier
    * @Author By: zjn 2018/7/2  9:48
    */
    public Supplier find(int id);
    /**
    * 根据主键查询
    *
    * @Param: [id]
    * @Return: cc.yugu.yhdw.common.domain.hdw.SupplierInfo
    * @Author By: zjn 2018/7/2  9:48
    */
    public SupplierInfo findInfo(int id);
    /**
    * 根据类型查询
    *
    * @Param: [type]
    * @Return: java.util.List<cc.yugu.yhdw.common.domain.hdw.Supplier>
    * @Author By: zjn 2018/7/2  9:48
    */
    public List<Supplier> findByType(@Param("type") int type);
    /**
    * 根据启用标识查询
    *
    * @Param: [activeFlag]
    * @Return: java.util.List<cc.yugu.yhdw.common.domain.hdw.Supplier>
    * @Author By: zjn 2018/7/2  9:48
    */
    public List<Supplier> findAll(int activeFlag);
    /**
    * 查询，返回行数
    *
    * @Param: [search]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:48
    */
    public int findPageCount(Supplier search);
    /**
    * 分页查询
    *
    * @Param: [search]
    * @Return: java.util.List<cc.yugu.yhdw.common.domain.hdw.Supplier>
    * @Author By: zjn 2018/7/2  9:48
    */
    public List<Supplier> findPageResult(Supplier search);
    /**
    * 插入
    *
    * @Param: [supplier]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:48
    */
    public int insert(Supplier supplier);
    /**
    * 按主键更新
    *
    * @Param: [supplier]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:49
    */
    public int update(Supplier supplier);
    /**
    * 按条件更新 启用标识
    *
    * @Param: [id, activeFlag]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:49
    */
    public int disable(@Param("id") Integer id,@Param("activeFlag") int activeFlag);
    /**
    * 按主键更新余额
    *
    * @Param: [id, balance]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:49
    */
    public int updateBalance(@Param("id") Integer id, @Param("balance") Integer balance);
    /**
    * 根据主键删除
    *
    * @Param: [id]
    * @Return: int
    * @Author By: zjn 2018/7/2  9:49
    */
    public int delete(int id);
}
